<template>
  <div>
       <h3 class="header" v-if="$route.meta.title">{{$route.meta.title}}</h3>
      <!-- 路由出口 -->
      <keep-alive > 
      <router-view class="main main1" v-if="$route.meta.keep"></router-view>
    </keep-alive>
    <router-view class="main main1" v-if="!$route.meta.keep"></router-view>

      <!-- 命名视图 -->
      <router-view name="second"></router-view>
  </div>
</template>

<script>
export default {

}
</script>

<style>
.title {
  font-size: 0.4rem;
  color: #ff4400;
  text-align: center;
}
.main {
  padding-top: 0.8rem;
}
.header {
  width: 100vw;
  height: 0.8rem;
  text-align: center;
  line-height: 0.8rem;
  background: #ff4400;
  color: #fff;
  position: fixed;
  left: 0;
  top: 0;
}
</style>